home *** CD-ROM | disk | FTP | other *** search
Wrap
/* $VER: CfgUUCP.thor 0.6 (7.11.1996) * * External configuration for the UUCP bbstype. * * Script by: Kjell Irgens, Ultima Thule Software. */ parse arg argument options results template = 'BBSNAME,CONFNAME/K,PUBSCREEN/K' p=address()||' '||show('P',,);if pos('THOR.',p)>0 then thorport=word(, substr(p,pos('THOR.',p)),1);else do;say 'No THOR port found!';exit 10;end if ~show('p', 'BBSREAD') then do address command "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead" "WaitForPort BBSREAD" end address "BBSREAD" READARGS template ARGS CMDLINE argument if rc ~= 0 then exit GETBBSDATA bbsname '"'ARGS.BBSNAME'"' stem BBSDATA if rc ~= 0 then do address(thorport) REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"' exit 5 end address(thorport) REQUESTNOTIFY TEXT '"Change configuration or headers?"' BT '"C_onfig|_Headers|_Cancel"' if result = 1 then do if ~open(file, BBSDATA.BBSPATH||"UUCPExtConfig", 'W') then do address(thorport) REQUESTNOTIFY '"Could not create config file."' '"_Ok"' exit 0 end call writeln(file, "4") REQUESTNOTIFY TEXT '"Use THOR as news reader\nor mail reader only?"' BT '"_News & Mail|_Mail only"' if result = 1 then do if(exists("uunews:")) then newsdir = "UUNews:" else newsdir = "" REQUESTFILE TITLE '"Select news directory:"' ID '"'newsdir'"' FP PAT '"~#?"' call writeln(file, result) REQUESTNOTIFY TEXT '"Should THOR use a From: line in postings?\nIf not, remember to add -f/-R arguments to\nthe postnews command"' BT '"_Yes|_No"' if result = 1 then call writeln(file, "News_From") else writeln(file, "") REQUESTSTRING TITLE '"News posting command? (e.g. postnews)"' BT '"_Ok"' MAXCHARS 60 if(rc ~= 0) then call writeln(file, "postnews") else call writeln(file, result) end else do call writeln(file, "") call writeln(file, "") call writeln(file, "") end REQUESTNOTIFY TEXT '"Should THOR use a From: line in your mails?\nIf not, remember to add -f/-r arguments to\nthe sendmail command"' BT '"_Yes|_No"' if result = 1 then call writeln(file, "Mail_From") else writeln(file, "") REQUESTSTRING TITLE '"Mail sending command? (e.g. sendmail)"' BT '"_Ok"' MAXCHARS 60 if(rc ~= 0) then call writeln(file, "sendmail") else call writeln(file, result) REQUESTNOTIFY TEXT '"Should THOR generate Message-Id headers?"' BT '"_Yes|_No"' if result = 1 then call writeln(file, "Message-Id") else writeln(file, "") REQUESTNOTIFY TEXT '"Should THOR generate Date headers?"' BT '"_Yes|_No"' if result = 1 then call writeln(file, "Date") else writeln(file, "") exit 0 end if result = 2 then do REQUESTNOTIFY TEXT '"You may create extra header lines to appear\nin the editor when you write messages.\nFollowup-To: and Keywords: are good examples."' BT '"_Edit|_Delete|_Cancel"' if result = 1 then do STARTEDITOR FILE BBSDATA.BBSPATH||".header" end if result = 2 then address command "delete >NIL: "||BBSDATA.BBSPATH||".header" end